﻿using AutoMapper;
using TraceabilityApp_Api.Application.Command.Breed_养殖_;
using TraceabilityApp_Api.Application.Command.DeepProcessing_深加工_;
using TraceabilityApp_Api.Application.Command.Slaughter_屠宰_;
using TraceabilityApp_Api.Application.Command.Traceability;
using TraceabilityApp_Domain;

namespace TraceabilityApp_Api
{
    public class Mappers:Profile
    {
        public Mappers()
        {
            //溯源基本信息
            CreateMap<AddTraceadilityCommand,TraceabilityModel>().ReverseMap();
            CreateMap<UpdateTraceadilityCommand, TraceabilityModel>().ReverseMap();
            //溯源养殖信息
            CreateMap<AddBreedCommand, BreedModel>().ReverseMap();
            CreateMap<UpdateBreedCommand, BreedModel>().ReverseMap();
            //溯源养殖保健信息
            CreateMap<AddHealthcareCommand, HealthcareModel>().ReverseMap();
            CreateMap<UpdateHealthcareCommand, HealthcareModel>().ReverseMap();
            //溯源养殖企业
            CreateMap<AddFirmCommand, FirmModel>().ReverseMap();
            CreateMap<UpdateFirmCommand, FirmModel>().ReverseMap();
            //溯源屠宰信息
            CreateMap<AddSlaughterCommand, SlaughterModel>().ReverseMap();
            CreateMap<UpdateSlaughterCommand, SlaughterModel>().ReverseMap();
            //溯源屠宰企业信息
            CreateMap<AddCompanyCommand, CompanyModel>().ReverseMap();
            CreateMap<UpdateCompanyCommand, CompanyModel>().ReverseMap();
            //溯源深加工信息
            CreateMap<AddDeepProcessingCommand, DeepProcessingModel>().ReverseMap();
            CreateMap<UpdateDeepProcessingCommand, DeepProcessingModel>().ReverseMap();
            //溯源深加工企业信息
            CreateMap<AddEnterpriseCommand, EnterpriseModel>().ReverseMap();
            CreateMap<UpdateEnterpriseCommand, EnterpriseModel>().ReverseMap();
            //溯源深加工供应商信息
            CreateMap<AddSupplierCommand, SupplierModel>().ReverseMap();
        }
    }
}
